package com.mjsoftking.palettelib.bean;

import android.graphics.Paint;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

/**
 * 用途：
 * <p>
 * 作者：MJSoftKing
 */
public class PaletteDrawConfig {

    public List<PalettePoint> points;

    public Paint paint;

    public String key;

    public PaletteDrawConfig() {
        this.points = new ArrayList<>();
        this.key = UUID.randomUUID().toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof PaletteDrawConfig)) return false;
        PaletteDrawConfig line = (PaletteDrawConfig) o;
        return key.equals(line.key);
    }

    @Override
    public int hashCode() {
        return key.hashCode();
    }
}
